<template>
  <div class="middleRight">
    <div class="pics">
      <el-carousel :interval="3500" type="card" height="240px">
        <el-carousel-item v-for="item in 6" :key="item">
          <h3 class="medium">{{ item }}</h3>
        </el-carousel-item>
      </el-carousel>
    </div>
    <div class="middleRight_bottom">
      <el-col
        v-for="item in notMyPlayList"
        style="flex: 25%"
        :key="item"
        :span="8"
      >
        <el-card
          @click="toDetail(item)"
          shadow="hover"
          class="cardItem"
          :body-style="{ padding: '0px' }"
        >
          <img :src="item.coverImgUrl" class="image" />
          <div>
            <span>{{ item.name }}</span>
            <div class="bottom">
              <!-- <el-button type="text" class="button">{{ item.updateFrequency ? item.updateFrequency : item.description }}</el-button> -->
              <span type="text" class="button">{{
                item.updateFrequency ? item.updateFrequency : "-"
              }}</span>
            </div>
          </div>
        </el-card>
      </el-col>
    </div>
  </div>
</template>

<script>
export default {
  name: "Middleright",
  props: {
    notMyPlayList: {
      type: Array,
    },
    myPlayList: {
      type: Array,
    },
    notMyPlayList: {
      type: Array,
    },
  },

  data() {
    return {};
  },

  mounted() {},

  methods: {
    toDetail(data) {
      console.log("歌单id==>>", data.id);
      this.$emit("getPlayListAll", data);
    },
  },
};
</script>

<style lang="less" scoped>
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

.middleRight {
  .pics {
    margin-top: 10px;
  }
  .middleRight_bottom {
    // background: lightpink;
    width: 100%;
    height: 400px;
    overflow: scroll;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;

    .cardItem {
      margin: 5px;
      text-align: center;
      cursor: pointer;

      .image {
        width: 100%;
        height: 40%;
      }
    }
  }
}
</style>